package com.abel.domain.types;

public enum GraduationStatus {
	
	YES ("Y", "Yes"),
	NO ("N", "No");
	
	private String gradStatusCode;
	
	private String gradStatus;
	
	private GraduationStatus (String gradStatusCode, String gradStatus) {
	
		this.gradStatusCode = gradStatusCode;
		this.gradStatus = gradStatus;
	}

	/**
	 * @return the gradStatusCode
	 */
	public String getGradStatusCode() {
		return gradStatusCode;
	}

	/**
	 * @return the gradStatus
	 */
	public String getGradStatus() {
		return gradStatus;
	}
	
	
	public static String getGradStatus(String gradStatusCode) {
		
		if (gradStatusCode != null) {
			
			for (GraduationStatus graduationStatus : GraduationStatus.values()) {
				
				if (graduationStatus.getGradStatusCode().equals(gradStatusCode)) {
					return graduationStatus.getGradStatus();
				}
			}
		}
		return null;
	}
}
